package com.weiyin.examination.module;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;
import java.util.List;

/**
 * @author njf
 * @date 2017/9/20
 */

public class SelectionModule implements Parcelable {
    private List<SelectionTypeModule> left;
    private List<SelectionTypeModule> right;
    private List<SelectionTypeModule> center;
    /**
     * 内容对应id
     */
    private String id;
    /**
     * 音译中题目内容
     */
    private String subjectContent;
    /**
     * 备选内容(用逗号隔开)
     */
    private String selectContent;
    /**
     * 图片地址
     */
    private String imageUrl;


    protected SelectionModule(Parcel in) {
        left = in.createTypedArrayList(SelectionTypeModule.CREATOR);
        right = in.createTypedArrayList(SelectionTypeModule.CREATOR);
        center = in.createTypedArrayList(SelectionTypeModule.CREATOR);
        id = in.readString();
        subjectContent = in.readString();
        selectContent = in.readString();
        imageUrl = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeTypedList(left);
        dest.writeTypedList(right);
        dest.writeTypedList(center);
        dest.writeString(id);
        dest.writeString(subjectContent);
        dest.writeString(selectContent);
        dest.writeString(imageUrl);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<SelectionModule> CREATOR = new Creator<SelectionModule>() {
        @Override
        public SelectionModule createFromParcel(Parcel in) {
            return new SelectionModule(in);
        }

        @Override
        public SelectionModule[] newArray(int size) {
            return new SelectionModule[size];
        }
    };

    public List<SelectionTypeModule> getLeft() {
        return left;
    }

    public void setLeft(List<SelectionTypeModule> left) {
        this.left = left;
    }

    public List<SelectionTypeModule> getRight() {
        return right;
    }

    public void setRight(List<SelectionTypeModule> right) {
        this.right = right;
    }

    public List<SelectionTypeModule> getCenter() {
        return center;
    }

    public void setCenter(List<SelectionTypeModule> center) {
        this.center = center;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSubjectContent() {
        return subjectContent;
    }

    public void setSubjectContent(String subjectContent) {
        this.subjectContent = subjectContent;
    }

    public String getSelectContent() {
        return selectContent;
    }

    public void setSelectContent(String selectContent) {
        this.selectContent = selectContent;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

}
